﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ProjetoForm
{
    public partial class menuHomeFuncionario : UserControl
    {
        public FlowLayoutPanel Conteudo { get; private set; }

        public menuHomeFuncionario(FlowLayoutPanel containerFuncionario)
        {
            InitializeComponent();
            this.Conteudo = containerFuncionario;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.Visible = false;

            Forms.controleCadastroIngresso = new CadastroIngresso(Conteudo);
            Conteudo.Controls.Add(Forms.controleCadastroIngresso);

            Forms.controleCadastroIngresso.Visible = true;
            this.Refresh();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.Visible = false;

            Forms.controleLanchonete = new Lanchonete(Conteudo);
            Conteudo.Controls.Add(Forms.controleLanchonete);

            Forms.controleLanchonete.Visible = true;
            this.Refresh();
        }

        private void button3_Click(object sender, EventArgs e)
        {
            this.Visible = false;

            Forms.controleSaida = new saida(Conteudo);
            Conteudo.Controls.Add(Forms.controleSaida);

            Forms.controleSaida.Visible = true;
            this.Refresh();

        }

        private void btn_logout_Click(object sender, EventArgs e)
        {
            new FormLogin().Show();
            this.FindForm().Dispose();
        }
    }
}
